<template>
    <div>
        <!-- 最上边 -->
        <myhead></myhead>
        <!--  搜索那一栏-->
        <mysearch></mysearch>
        <!-- >> -->
        <mytype></mytype>

       <ul>
          <every :Product='Product'></every>
        </ul>

    </div>
</template>

<script>
import myhead from '@/components/myhead'
import mysearch from '@/components/mySearch'
import mytype from '@/components/mytype'
import every from '@/components/every'
export default {
    name: 'Home',
    data() {
        return {
             list:[],
            // 手机
            Product:[],
        };
    },
    created() {
    // 请求轮播图
    this.$axios({
      url:'/resources/carousel',
      method:'post'
    }).then(res => {
      console.log(res.data.carousel);
      this.list = res.data.carousel
    })
    // 请求手机
    this.$axios({
      url:'/product/getHotProduct',
      method:'post',
      data:{"categoryName":
      ["电视机","空调","洗衣机","保护套", "保护膜", "充电器", "充电宝"]}
    }).then(res => {
      this.Product = res.data.Product
    })
  },
    methods: {

    },
    //组件挂载
    components: {
        myhead,
        mysearch,
        mytype,
        every

    },
    //计算属性
    computed: {},
    //过滤器
    filters: {},
};
</script>

<style lang="scss" scoped>

</style>
